/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hotel.visitor.booking;

import java.lang.reflect.Method;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author haind
 */
@Controller
public class CheckAbility {
    @RequestMapping(method = RequestMethod.POST, params = "CheckAbility", value = "/checkability.htm")
    public String submit(HttpServletRequest request, HttpServletResponse response)
    {
        System.out.println("\n\n\n\ncheck ability");
        return "redirect:checkAbility.htm";
    }

//    @RequestMapping(value = "/checkAbility", method = RequestMethod.GET)
//    public ModelAndView prepareComponent(HttpServletRequest request, HttpServletResponse response)
//    {
//        System.out.println("-----------------O_O----------------");
//        ModelAndView model = new ModelAndView("guest/checkAbility");
//        return model;
//    }
    @RequestMapping(method = RequestMethod.GET, value = "checkAbility")
    public ModelAndView prepareComponent(HttpServletRequest request, HttpServletResponse response, Locale locale)
    {
        System.out.println("-----prepare check ability---" + locale.getLanguage());
        ModelAndView model = new ModelAndView("guest/checkAbility");
        return model;
    }
}
